import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        int n = in.nextInt();
        int x = in.nextInt();
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            nums[i] = in.nextInt();
        }
        int left = 0;
        int right = 0;
        int sum = 0;
        int minLength  = 0x3f3f3f3f;
        int minLeft = -1;
        int minRight = -1;
        while (right < n) {
            while (right < n && sum < x) {
                sum += nums[right++];
            }
            while (sum >= x && left < right) {
                if (right - left < minLength) {
                    minLength = right - left;
                    minLeft = left + 1;
                    minRight = right;
                }
                sum -= nums[left++];
            }
        }
        System.out.println(minLeft + " " + minRight);
    }
}
